package com.qianxin;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Scanner;

/**
 * @Author xiongmin
 * @Description //TODO
 * @Date 2020/2/28 19:08
 * @Version 1.0
 **/
public class 幸运概率 {
    static Scanner cin = new Scanner(System.in);

    public static void main(String[] args) {
        int n = cin.nextInt();
        if (n > 990) {
            System.out.println("1.000000");
        } else {
            BigDecimal down = BigDecimal.ONE;
            for (int i = 991; i <= 1000; i++) {
                down = down.multiply(BigDecimal.valueOf(i));
            }
            BigDecimal up = BigDecimal.ONE;
            for (int i = 990 - n + 1; i <= 1000 - n; i++) {
                up = up.multiply(BigDecimal.valueOf(i));
            }
            System.out.println(up + " " + down);
            up = up.divide(down);
            up = up.multiply(BigDecimal.valueOf(1000000));
            int tag = up.intValue();
            double result = tag/1000000;

            System.out.printf("%.6f", result);
        }
    }
}
